package com.dt.dubai.mech.service;

import com.dt.dubai.mech.entity.MechCouponCustomerEntity;
import com.dt.dubai.mech.service.innate.MechCouponCustomerSerInnateAbsImp;
import com.dt.dubai.mech.service.ser.MechCouponCustomerService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MechCouponCustomerServiceImp extends MechCouponCustomerSerInnateAbsImp implements MechCouponCustomerService {

    /*innateServiceStart*/
    @Override
    protected void userSavEntity(MechCouponCustomerEntity inEntity) {

    }

    @Override
    protected void userModEntity(MechCouponCustomerEntity inEntity, MechCouponCustomerEntity upEntity) {
        upEntity.setCouponRecordId(inEntity.getCouponRecordId()); // 优惠券记录ID
        upEntity.setYesUse(inEntity.getYesUse()); // 是否使用

    }

    /*innateServiceEnd*/
    /*以上内容请误删除或是移动，系统升级使用，static系统升级覆盖用户修改，用户代码请写入下方*/
    //查询用户优惠券使用情况

    @Override
    public List<Long> selectRecordIdByCustomerAndUseStatus(Long customerLoginRecordId, Boolean yesUse) {
        List<Long> list=mechCouponCustomerMapper.selectRecordIdByCustomerAndUseStatus(customerLoginRecordId,yesUse);
        return list;
    }
}
